<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Nabu-asr: nabu.neuralnetworks.decoders.max_decoder.MaxDecoder Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Nabu-asr
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacenabu.html">nabu</a></li><li class="navelem"><b>neuralnetworks</b></li><li class="navelem"><b>decoders</b></li><li class="navelem"><b>max_decoder</b></li><li class="navelem"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html">MaxDecoder</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">nabu.neuralnetworks.decoders.max_decoder.MaxDecoder Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>max Decoder takes the maximum probability at each timestep  
 <a href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for nabu.neuralnetworks.decoders.max_decoder.MaxDecoder:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.png" usemap="#nabu.neuralnetworks.decoders.max_5Fdecoder.MaxDecoder_map" alt=""/>
  <map id="nabu.neuralnetworks.decoders.max_5Fdecoder.MaxDecoder_map" name="nabu.neuralnetworks.decoders.max_decoder.MaxDecoder_map">
<area href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html" title="the abstract class for a decode " alt="nabu.neuralnetworks.decoders.decoder.Decoder" shape="rect" coords="0,56,344,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae1a954c254794ed12472575bfd075a55"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html#ae1a954c254794ed12472575bfd075a55">__init__</a> (self, conf, model)</td></tr>
<tr class="memdesc:ae1a954c254794ed12472575bfd075a55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decoder constructor.  <a href="#ae1a954c254794ed12472575bfd075a55">More...</a><br /></td></tr>
<tr class="separator:ae1a954c254794ed12472575bfd075a55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a105ad3de402bb7d8fe9b24a580f9af8f"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html#a105ad3de402bb7d8fe9b24a580f9af8f">__call__</a> (self, inputs, input_seq_length)</td></tr>
<tr class="memdesc:a105ad3de402bb7d8fe9b24a580f9af8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">decode a batch of data  <a href="#a105ad3de402bb7d8fe9b24a580f9af8f">More...</a><br /></td></tr>
<tr class="separator:a105ad3de402bb7d8fe9b24a580f9af8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a195b8a8632ed5db719d98fe7c42f981b"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html#a195b8a8632ed5db719d98fe7c42f981b">write</a> (self, outputs, directory, names)</td></tr>
<tr class="memdesc:a195b8a8632ed5db719d98fe7c42f981b"><td class="mdescLeft">&#160;</td><td class="mdescRight">write the output of the decoder to disk  <a href="#a195b8a8632ed5db719d98fe7c42f981b">More...</a><br /></td></tr>
<tr class="separator:a195b8a8632ed5db719d98fe7c42f981b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa86cfd8c738937c177e0e234b6a07e9d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1max__decoder_1_1MaxDecoder.html#aa86cfd8c738937c177e0e234b6a07e9d">update_evaluation_loss</a> (self, loss, outputs, references, reference_seq_length)</td></tr>
<tr class="memdesc:aa86cfd8c738937c177e0e234b6a07e9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">update the evaluation loss  <a href="#aa86cfd8c738937c177e0e234b6a07e9d">More...</a><br /></td></tr>
<tr class="separator:aa86cfd8c738937c177e0e234b6a07e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html">nabu.neuralnetworks.decoders.decoder.Decoder</a></td></tr>
<tr class="memitem:ae54617bb6f81a4352fe94ccf19c8793d inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#ae54617bb6f81a4352fe94ccf19c8793d">__init__</a> (self, conf, model)</td></tr>
<tr class="memdesc:ae54617bb6f81a4352fe94ccf19c8793d inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html" title="the abstract class for a decode ">Decoder</a> constructor.  <a href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#ae54617bb6f81a4352fe94ccf19c8793d">More...</a><br /></td></tr>
<tr class="separator:ae54617bb6f81a4352fe94ccf19c8793d inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5eef71bce762d674b1e35ef63c691b inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#afb5eef71bce762d674b1e35ef63c691b">__call__</a> (self, inputs, input_seq_length)</td></tr>
<tr class="memdesc:afb5eef71bce762d674b1e35ef63c691b inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="mdescLeft">&#160;</td><td class="mdescRight">decode a batch of data  <a href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#afb5eef71bce762d674b1e35ef63c691b">More...</a><br /></td></tr>
<tr class="separator:afb5eef71bce762d674b1e35ef63c691b inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7a2573ec49bf0ca845368cfb0d111fd inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#af7a2573ec49bf0ca845368cfb0d111fd">write</a> (self, outputs, directory, names)</td></tr>
<tr class="memdesc:af7a2573ec49bf0ca845368cfb0d111fd inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="mdescLeft">&#160;</td><td class="mdescRight">write the output of the decoder to disk  <a href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#af7a2573ec49bf0ca845368cfb0d111fd">More...</a><br /></td></tr>
<tr class="separator:af7a2573ec49bf0ca845368cfb0d111fd inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3955d6a8abcb29eb5680e5532f1549f inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#af3955d6a8abcb29eb5680e5532f1549f">update_evaluation_loss</a> (self, loss, outputs, references, reference_seq_length)</td></tr>
<tr class="memdesc:af3955d6a8abcb29eb5680e5532f1549f inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="mdescLeft">&#160;</td><td class="mdescRight">update the evaluation loss  <a href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html#af3955d6a8abcb29eb5680e5532f1549f">More...</a><br /></td></tr>
<tr class="separator:af3955d6a8abcb29eb5680e5532f1549f inherit pub_methods_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a015e0197524e5218e910eb5e6394051b"><td class="memItemLeft" align="right" valign="top"><a id="a015e0197524e5218e910eb5e6394051b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>alphabets</b></td></tr>
<tr class="separator:a015e0197524e5218e910eb5e6394051b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder.html">nabu.neuralnetworks.decoders.decoder.Decoder</a></td></tr>
<tr class="memitem:a47ce23a06a6c39ec60dba15f293fa323 inherit pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top"><a id="a47ce23a06a6c39ec60dba15f293fa323"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>conf</b></td></tr>
<tr class="separator:a47ce23a06a6c39ec60dba15f293fa323 inherit pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4e2266af863f1d92a1a0e798a75636c inherit pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memItemLeft" align="right" valign="top"><a id="af4e2266af863f1d92a1a0e798a75636c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>model</b></td></tr>
<tr class="separator:af4e2266af863f1d92a1a0e798a75636c inherit pub_attribs_classnabu_1_1neuralnetworks_1_1decoders_1_1decoder_1_1Decoder"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>max Decoder takes the maximum probability at each timestep </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae1a954c254794ed12472575bfd075a55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a954c254794ed12472575bfd075a55">&sect;&nbsp;</a></span>__init__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.decoders.max_decoder.MaxDecoder.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>conf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>model</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decoder constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conf</td><td>the decoder config </td></tr>
    <tr><td class="paramname">model</td><td>the model that will be used for decoding </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a105ad3de402bb7d8fe9b24a580f9af8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a105ad3de402bb7d8fe9b24a580f9af8f">&sect;&nbsp;</a></span>__call__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.decoders.max_decoder.MaxDecoder.__call__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>input_seq_length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>decode a batch of data </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inputs</td><td>the inputs as a dictionary of [batch_size x time x ...] </td></tr>
    <tr><td class="paramname">tensors</td><td></td></tr>
    <tr><td class="paramname">input_seq_length</td><td>the input sequence lengths as a dictionary of [batch_size] vectors</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>the decoded sequences as a dictionary of outputs </li>
</ul>
</dd></dl>

</div>
</div>
<a id="aa86cfd8c738937c177e0e234b6a07e9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa86cfd8c738937c177e0e234b6a07e9d">&sect;&nbsp;</a></span>update_evaluation_loss()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.decoders.max_decoder.MaxDecoder.update_evaluation_loss </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>loss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>outputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>references</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>reference_seq_length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>update the evaluation loss </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">loss</td><td>the current evaluation loss </td></tr>
    <tr><td class="paramname">outputs</td><td>the outputs of the decoder as a dictionary </td></tr>
    <tr><td class="paramname">references</td><td>the references as a dictionary </td></tr>
    <tr><td class="paramname">reference_seq_length</td><td>the sequence lengths of the references</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an op to update the evalution loss </dd></dl>

</div>
</div>
<a id="a195b8a8632ed5db719d98fe7c42f981b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a195b8a8632ed5db719d98fe7c42f981b">&sect;&nbsp;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.decoders.max_decoder.MaxDecoder.write </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>outputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>directory</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>names</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>write the output of the decoder to disk </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">outputs</td><td>the outputs of the decoder </td></tr>
    <tr><td class="paramname">directory</td><td>the directory where the results should be written </td></tr>
    <tr><td class="paramname">names</td><td>the names of the utterances in outputs </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="max__decoder_8py.html">max_decoder.py</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>
